File name 19771107_Adding_New_Devices_To_The_Channel_Interface.pdfInter-Office Memorandum
DRAFT - DRAFT - DRAFT - DRAFT
To Pilot interest Date Novem ber 7, 1977
From Paul McJones Location Palo Alto
Subject Adding new devices to the Channel interface
Organization SO~/SO
XEROX XEROX SDD ARCR1VES _
I have .roaCt and undo1"::;tood.
Filed on: [lfs] Channel.memo rag es __,_.---'fo - , - - - - -
'f'I
_ _ __
1h~e
Reviewer_-----
# of Pages _ __ Ed. -t1SDQ-.:2 feJ4
The problem
The Channel interface in the second draft of the Pilot Functional Specification has the
property that adding a new device requires editing and recompiling the Channel DEFINITIONS
module, and thus all the modules which include it. This is in conflict with the desire not to
recompile the system except for the semiannual releases (assuming new devices are to be
added between releases). Thus we propose a revised Channel interface, which, it is claimed,
solves the recompilation problem.
The problem with the current interface stems from its dependence on the enumerated type
Channel.DeviceType, which has a value for each implementation of the interface. Adding a
new implementation requires adding a new value to DeviceType, and also adding
corresponding variants to the definitions of the DeviceType-tagged variant record types
DeviceSelection, PhysicalRecordStatus, DeviceCommand. DeviceStatus, and "Rep" (the
private record to which a Handle points). (It is worth noting that these variant records
constitute a nuisance for both client and implementor. Most values crossing the interface
must be wrapped in a variant record constructor, and then "unwrapped" with a one-armed
WITH statement essentially doing at runtime what Mesa is meant to do at compile time.)
A solution
Half of the operations in the current interface do not depend on DeviceType. and so are
not a problem:
Delete
Suspend
Restart
GetPhysicalRecord
PutPhysicalRecord
Those which do depend on DeviceType are:
Create (accepts DeviceSelection)
WaitPhysicalRecord (retu rns PhysicalRecordStatus)
Comm |